import ajax from "@/lib/ajax";
import config from "@/config";

const HOST = config.host("/api", "/gateway/common");

// 上传文件
const uploadFile = (param) => {
  return ajax.post(`${HOST}/upload`, param);
};

// 下载文件
const downloadFile = (param) => {
  return `${HOST}/download?path=${encodeURIComponent(param)}`;
};

export { uploadFile, downloadFile };
